<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use Hyperf\HttpServer\Router\Router;

Router::addRoute(['GET', 'POST', 'HEAD'], '/', 'App\Controller\IndexController@index');

Router::get('/favicon.ico', function () {
    return '';
});

Router::get('/index', 'App\Controller\IndexController@index');


Router::addRoute(['GET', 'POST'], '/test', 'App\Controller\IndexController@test');
Router::addRoute(['GET', 'POST'], '/test53', 'App\Controller\IndexController@test53');
Router::addRoute(['GET', 'POST'], '/test54', 'App\Controller\IndexController@test54');
Router::addRoute(['GET', 'POST'], '/test54_1', 'App\Controller\IndexController@test54_1');
Router::addRoute(['GET', 'POST'], '/test54_2', 'App\Controller\IndexController@test54_2');
Router::addRoute(['GET', 'POST'], '/test20_1', 'App\Controller\IndexController@test20_1');
Router::addRoute(['GET', 'POST'], '/test20_2', 'App\Controller\IndexController@test20_2');
Router::addRoute(['GET', 'POST'], '/stop20_1', 'App\Controller\IndexController@stop20_1');
Router::addRoute(['GET', 'POST'], '/stop20_2', 'App\Controller\IndexController@stop20_2');
Router::addRoute(['GET', 'POST'], '/test55', 'App\Controller\IndexController@test55');
Router::addRoute(['GET', 'POST'], '/test40', 'App\Controller\IndexController@test40');
Router::addRoute(['GET', 'POST'], '/test_post', 'App\Controller\IndexController@test_post');

//普通打开充电通道
Router::addRoute(['GET', 'POST'], '/api/ChargeCtl/chargeOpen', 'App\Controller\MachineController@startCharge');
//结束充电
Router::addRoute(['GET', 'POST'], '/api/ChargeCtl/closeCharge', 'App\Controller\MachineController@stopCharge');
//查询余额
Router::addRoute(['GET', 'POST'], '/api/ChargeCtl/queryBalance', 'App\Controller\MachineController@queryBalance');
//重启
Router::addRoute(['GET', 'POST'], '/api/ChargeCtl/rebootStation', 'App\Controller\MachineController@rebootStation');
//下发从机编号
Router::addRoute(['GET', 'POST'], '/api/ChargeCtl/setStation', 'App\Controller\MachineController@setStation');
//设置回调地址
Router::addRoute(['GET', 'POST'], '/api/ChargeCtl/setCallBackUrl', 'App\Controller\MachineController@setCallBackUrl');
//设置ip
Router::addRoute(['GET', 'POST'], '/api/ChargeCtl/ipset', 'App\Controller\MachineController@ipset');